<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="" >

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">核销码:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-title" data-rule="required" class="form-control" name="code" type="number">
        </div>
    </div>
    <h4>核销该活动请扫:</h4>
   <div id="qr" style="width:250px;">



   </div>
    <script src="__CDN__/assets/libs/jquery/dist/jquery.min.js"></script>
    <script src="__CDN__/assets/libs/qrcode.min.js"></script>


<script>
    var url="{$url}";
    var qrcode = new  QRCode(document.getElementById("qr"), {
        text: url,
        width:150,
        height:150,
        colorDark : "#000000",
        colorLight : "#ffffff",
        typeNumber:4,
        correctLevel : QRCode.CorrectLevel.Q
    });
    $('#qr').find('img').css('width','100%');





</script>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
